import request from '@/axios/axios'

// 查询白名单用户
export function whiteUserList(query) {
  return request({
    url: 'app/v1/white-user/page',
    method: 'get',
    params: query
  })
}

// 删除白名单用户
export function deleteWhiteUser(whiteUserId) {
  return request({
    url: `app/v1/white-user/${whiteUserId}`,
    method: 'DELETE'
  })
}

// 新增白名单用户
export function addWhiteUser(query) {
  return request({
    url: 'app/v1/white-user',
    method: 'POST',
    data: query
  })
}

// 编辑白名单用户
export function modifyWhiteUser(query) {
  return request({
    url: 'app/v1/white-user',
    method: 'PUT',
    data: query
  })
}

// 启用/禁用白名单用户
export function modifyLockFlag(query) {
  return request({
    url: 'app/v1/white-user/lock-flag',
    method: 'PUT',
    data: query
  })
}

